﻿CREATE proc [dbo].[danhmucCTKT_Them]
@ma_ctu varchar(255),
@ten_ctu nvarchar(255),
@last_ctu nvarchar(255),
@nhom_ctu nvarchar(255),
@no_co nvarchar(255),
@so_ctukt nvarchar(255),
@tk_trung nvarchar(255),
@ghichu nvarchar(255)
as
if exists(select * from DM_CTu_KT  Where ma_ctu  =@ma_ctu  or ten_ctu=@ten_ctu  )
begin
select ErrCode=0
end
else
begin
insert into DM_CTu_KT (ma_ctu ,ten_ctu ,last_ctu ,nhom_ctu ,no_co,so_ctukt,tk_trung,ghichu  )
				values(@ma_ctu,@ten_ctu,@last_ctu,@nhom_ctu ,@no_co ,@so_ctukt,@tk_trung,@ghichu) 
select ErrCode=1
end